<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Invited</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="http://localhost:8000/static/bootstrap.css" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>
    <link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){
	$('#searchInInvited').validate();
	});
	</script>
  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <div class="nav-collapse">
            <ul class="nav">
              	<a class="brand" href="/homePage/">Eventati</a>
		          <li><a href ="/DashboardHome/">Home Page</a></li>     
		          <li > <a href="/AboutUs/">About Us</a></li>
		          <li><a href="/ViewInstructions/">Instructions</a></li>
		          <li><a href  ="/Terms&Conditions/">  Terms & Conditions</a></li>
		         <li><a href  ="/News/">  Latest News and Updates</a></li>
		         <li><a href ="/Faqs/"> FAQS</a></li>
		         <li><a href ="/Contactus/"> Contactus</a></li>
				<!-- Author: Amina Kadry This form is for logging the user out of his account -->

		         <li><a href="/logout/" method="POST">Log out</a></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container">
	
      <div class="hero-unit">
        	{%if flag%}
			<h2>All Invited to Events </h2>
			<!-- Author: Miran Shahin
					This block conatins a loop that displays all the events the user is invited to 
			-->
				<ul>
				{% for event in allInvitedEvents %}
			  		<a href = "/EventPage/{{event.id}}"> <li>{{ event.template.eventName }}</li></a>
				{% endfor %}

				</ul>
				<form id = "searchInInvited" action="/searchInInvited/" method="POST">
			   		{%csrf_token%}
			  		<h3> please enter event name </h3>
			    	<input type="text" size="50"  name="search" class="required" minlength="1">
			    	<br>
			    	<input type="submit" value="Search now!" ><br>
				</form>
			{%else%}
				<h2>  Search Results </h2>
			<!-- Author: Miran Shahin
					This block conatins a mini-search engine that allows the user to search within the invited events.
						First form: allows the user to pick a search category and enter a search key
						Then the results of the search are displayed using the for loop below the form
			-->		
			<a href ="/InvitedEvents/">  back to all invited to list</a>
				<font color = 'red'>{{result}}</font>
			   	<ul>
			    {% for event in eventsList%}
			    	<li>
			   		Event Name:<a href="/EventPage/{{event.id}}">{{event.template.eventName}}</a><br>
			   		</li>
			   	</ul>
			    {%endfor%}

			  	<form id = "searchInInvited" action="/searchInInvited/" method="POST">
			   		{%csrf_token%}
			  		<h3> please enter event name </h3>
			    	<input type="text" size="50"  name="search" class="required" minlength="1">
			    	<br>
			    	<input type="submit" value="Search now!" ><br>
				</form>
			{%endif%}
			
      </div>

     
      <hr>

      <footer>
      <p class="pull-center">
		 <a href="/AboutUs/">About Us</a>
				<a href="/ViewInstructions/">Instructions</a>
				<a href  ="/Terms&Conditions/">  Terms & Conditions</a>
				<a href  ="/News/">  Latest News and Updates</a>
				<a href ="/Faqs/"> FAQS</a>
				<a href ="/Contactus/"> Contactus</a>
				<p class="pull-right"><a href="#">Back to top</a></p>

				        <p>&copy; Company 2012</p>      </footer>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="../assets/js/jquery.js"></script>
    <script src="../assets/js/bootstrap-transition.js"></script>
    <script src="../assets/js/bootstrap-alert.js"></script>
    <script src="../assets/js/bootstrap-modal.js"></script>
    <script src="../assets/js/bootstrap-dropdown.js"></script>
    <script src="../assets/js/bootstrap-scrollspy.js"></script>
    <script src="../assets/js/bootstrap-tab.js"></script>
    <script src="../assets/js/bootstrap-tooltip.js"></script>
    <script src="../assets/js/bootstrap-popover.js"></script>
    <script src="../assets/js/bootstrap-button.js"></script>
    <script src="../assets/js/bootstrap-collapse.js"></script>
    <script src="../assets/js/bootstrap-carousel.js"></script>
    <script src="../assets/js/bootstrap-typeahead.js"></script>

  </body>
</html>
